<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/taglibs.jsp"%>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection"content="telephone=no, email=no" />
    <title>一呼百应</title>
    <link rel="stylesheet" href="${basePath}/css/common.css?v=3">
    <link rel="stylesheet" href="${basePath}/css/style.css?v=3">
</head>
<body>
	<header>
        <h1>商铺绑定</h1>
    </header>
    <div class="page">
        <form id="bindForm" action="${basePath}/bind/submit" method="post" class="bind-form reg-form">
        	<input name="openid" value="${openid}" type="hidden" />
            <div class="input-control">
                <label for="username">用&nbsp;&nbsp;户&nbsp;&nbsp;名</label>
                <div class="input-box-control">
                    <input name="us" type="text" id="username" placeholder="请输入已注册的商铺用户名">
                </div>
            </div>
            <div class="input-control">
                <label for="password">密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                <div class="input-box-control">
                    <input name="pwd" type="password" id="password" placeholder="商铺密码">
                </div>
            </div>
            
            <div id="captcha-wrap" style="display: none;">
	            <div class="captcha">
	                <img id="random" src="" alt="验证码" class="code-img">
	                <a href="javascript:void(0)" onclick="showOtherCaptcha();">换一张</a>
	            </div>
	            <div id="captcha" class="input-control">
	                <label for="code">验证码：</label>
	                <div class="input-box-control">
	                    <input type="text" id="code" name="code">
	                </div>
	            </div>
            </div>
            
            
            <span id="sign_msg" class="tips-msg"></span>
            <a onclick="login()" class="bind-btn form-btn">确认绑定</a>
            <a href="${basePath}/bind/toReg?openid=${openid}" class="reg-btn form-btn">免费注册</a>
        </form>
        
        <p class="tips clearfix">
            <em>温馨提示：</em>
            <c:if test="${empty openid}">
        		<span class="tips-msg">未被授权获取用户信息，不能绑定<br>请重新点击按钮或联系客服</span>
        	</c:if>
        	<c:if test="${not empty openid}">
            	<span class="tips-msg">绑定后，卖家可以发布产品、查看卖家商机<br>买家可以发布求购、查看买家商机</span>
        	</c:if>
        </p>
        
        <div class="layer"></div>
        <div class="alert-box">
            <div class="title">
                <h3>错误提醒</h3>
                <a href="javascript:void(0)" class="alert-btn"></a>
            </div>
            <div class="content">
                <p>对不起，没有此用户</p>
            </div>
        </div>
        
    </div>
    <footer>
        <h1>服务热线：020-62307188</h1>
    </footer>
	
<script src="${basePath}/js/zepto.min.js"></script>
<script src="${basePath}/js/all.js?v=1106"></script>
<script src="${basePath}/js/bind_check.js?v=1106"></script>
</body>
</html>